package Controller;

import Behavior.HunterShoot;
import Impl.Scene;
import Model.*;
import Person.*;
import Duck.*;
public class SceneFour implements Scene {

    @Override
    public void SceneSimu() throws InterruptedException {
        System.out.println("-----------SCENE 2------------");
        // create a Hunter
        Person hunter = new Hunter();
        hunter.display();
        // 使用策略模式设置hunter的shoot behavior
        hunter.setShootBehavior(new HunterShoot());Thread.sleep(2000);
        // create a duck
        Duck mallarDuck = new MallardDuck();
        mallarDuck.display();Thread.sleep(2000);
        // hunter击中mallarDuck
        hunter.performShoot(mallarDuck);Thread.sleep(2000);
        System.out.println("hunter击中mallarDuck");
        mallarDuck.display();
        mallarDuck.getState();Thread.sleep(2000);
        // 复活机制启动
        System.out.println("复活机制启动");
        mallarDuck.reborn();
        mallarDuck.display();
        mallarDuck.getState();Thread.sleep(5000);

    }
}
